Image processing device, image processing method and computer-readable medium

ABSTRACT

An image-processing device comprises an acquisition section that acquires a binary image; a figure part identifying section that identifies a figure part in the binary image; a line segment identifying section that identifies line segments included in the figure part; a specific line segment extracting section that determines whether each line segment has an end portion having a specific shape, and extracts a line segment with an end portion having the specific shape as a specific line segment; and a table region determining section that determines whether the figure part is a table region based on the line segments identified by the line segment identifying section excluding the specific line segment.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based on and claims priority under 35 U.S.C. 119from Japanese Patent Application No. 2009-163704, which was filed onJul. 10, 2009.

BACKGROUND

1. Technical Field

The present invention relates to an image-processing device, animage-processing method, and a computer-readable medium.

2. Related Art

A technique for recognizing a table region in an image has beenproposed.

SUMMARY

In one aspect of the present invention, there is provided animage-processing device comprising an acquisition section that acquiresa binary image represented by first pixels each having a first pixelvalue, and second pixels each having a second pixel value; a figure partidentifying section that identifies a figure part in the binary image; aline segment identifying section that identifies line segments includedin the figure part identified by the figure part identifying section; aspecific line segment extracting section that determines whether eachline segment identified by the line segment identifying section has anend portion having a specific shape, and extracts a line segment with anend portion having the specific shape as a specific line segment; and atable region determining section that determines whether the figure partidentified by the figure part identifying section is a table regionbased on the line segments identified by the line segment identifyingsection excluding the specific line segment extracted by the specificline segment extracting section.

BRIEF DESCRIPTION OF THE DRAWINGS

Exemplary embodiments of the present invention will be described indetail based on the following figures, wherein:

FIG. 1 is a block diagram showing a hardware structure of computerdevice 1;

FIG. 2 shows functional blocks implemented in computer device 1according to a first exemplary embodiment of the invention;

FIG. 3 is a flowchart showing a process flow executed by CPU 102according to the first exemplary embodiment of the invention;

FIG. 4 is a schematic diagram showing an example of a binary imageregarding the first exemplary embodiment of the invention;

FIG. 5 shows an example of content of line segment table TB10 obtainedby processing the image of FIG. 4 according to the first exemplaryembodiment of the invention;

FIG. 6 shows line segment table TB10 after deletion of rowscorresponding to some labels according to the first exemplary embodimentof the invention;

FIG. 7 schematically shows a result of identification of a table region

FIG. 8 shows functional blocks implemented in computer device 1according to a second exemplary embodiment of the invention;

FIG. 9 is a flowchart showing a process flow executed by CPU 102according to the second exemplary embodiment of the invention;

FIG. 10 is a schematic diagram showing an example of a binary imageregarding the second exemplary embodiment of the invention;

FIG. 11 shows an example of content of line segment table TB10 obtainedby processing the image of FIG. 10 according to the second exemplaryembodiment of the invention;

FIG. 12 shows line segment table TB10 after deletion of rowscorresponding to some labels according to the second exemplaryembodiment of the invention; and

FIG. 13 shows an example of a binary image.

DETAILED DESCRIPTION

[First Exemplary Embodiment]

(Structure of First Exemplary Embodiment)

FIG. 1 is a block diagram showing a hardware structure of computerdevice 1 according to a first exemplary embodiment of the presentinvention. In this exemplary embodiment, computer device 1 isconstituted of a PC (Personal Computer), and various parts of the PC areconnected to bus 101 for communication of information.

Display section 107 includes a LCD (liquid crystal display), CRT(Cathode Ray Tube), ELD (electroluminescent display), or the like fordisplaying images. Display section 107 is controlled by CPU (CentralProcessing Unit) 102 to cause menus, a variety of messages, and the liketo be shown on the display for operation of computer device 1.

Operating section 106 includes an input device such as a keyboard, amouse, and the like for input of instructions into and carrying out ofcontrol operations in computer device 1.

Image-acquiring section 108 includes an interface for connection with ascanner. The scanner reads an image on a recording medium such as asheet of paper, creates image data of the image, and upon communicationwith image acquiring section 108 provides the image data to imageacquiring section 108.

Storage unit 105 may be a hard disk or other storage device and is usedto store a program for causing computer device 1 to execute functions ofan operating system, to store an image-processing program for processingimage data, and also to store image data acquired through the scanner.

ROM (Read Only Memory) 103 stores an IPL (Initial Program Loader), andCPU 102 reads out the IPL stored in ROM 103 and executes the same. Uponexecution of the IPL, a program for implementing the operating system isread out from storage unit 105, and executed. Once the program forimplementing the operating system is executed, CPU 102 can run theimage-processing program. The execution of an image-processing programby CPU 102 causes computer device 1 to function as an image-processingdevice that processes the image represented by the image data, andwhereby a function for identifying a table region in an image isimplemented.

FIG. 2 shows functional blocks implemented by execution of animage-processing program by CPU 102.

Binarizing section 200 is a section that binarizes the image representedby the image data acquired by image-acquiring section 108 into ablack-and-white image, and exemplifies an acquisition section thatacquires a binarized image (hereinafter referred to as a binary image).In this exemplary embodiment, a value of each pixel in a binary image isrepresented by one (1) bit, in which a black pixel is represented by “1”and a white pixel is represented by “0,” with white pixels forming abackground image. Conversely, a black pixel may be represented by “0”and a white pixel by “1.”

Figure part identifying section 201 is a section that identifies figureparts included in the binary image. As a technique for identifyingfigure parts in an image, any known technique may be adopted such asthat described in Japanese Patent Application Laid-Open Publication No.3-102964, for example. It is to be noted, however, that the techniquefor identifying figure parts in an image is not limited to thatdescribed in Publication No. 3-102964, and other techniques may beutilized.

Line segment identifying section 202 is a section for identifying linesegments contained in the figure parts identified by figure partidentifying section 201. As a technique for identifying line segments,various known techniques may be adopted such as that disclosed inJapanese Patent Application Laid-Open Publication No. 2-210586, in whichscanning of a binary image is conducted to identify a string ofcontinuously arranged black pixels as a line segment if the number ofcontinuously arranged black pixels constituting the string is largerthan a prescribed threshold number. It is to be noted, however, thetechnique for identifying line segments contained in figure parts in animage is not limited to that described in Publication No. 2-210586, andother techniques may be utilized. It should be also understood that inthe present specification, the term “line segment” is not intended to beinterpreted as a strict mathematical concept, but rather as asubstantially linear image object with a limited length constituted of aplurality of pixels.

Intersection-determining section 203 is a section for determiningwhether line segments identified by line segment identifying section 202intersect each other based on a start point, end point, length, and soon of each line segment.

Specific line segment extracting section 204 is a section thatrecognizes a shape of an end portion of each line segment identified byline segment identifying section 202, and extracts line segment(s)having a prescribed specific end portion shape. Specific line segmentextracting section 204 recognizes and judges the end portion shape ofeach line segment by using a technique such as pattern matching,statistical identification method, structure identification method, orthe like.

Table region determining section 205 determines that the line segmentsidentified by intersection-determining section 203 as not intersectingother line segments and the line segments extracted by specific linesegment extracting section 204 are not line segments that constitute atable, and judges whether the remaining line segments constitute atable. As a technique for judging whether a plurality of line segmentsconstitute a table, a technique disclosed in Japanese Patent ApplicationLaid-Open Publication No. 8-249419 may be adopted, for example, in whichthe number of black pixels constituting the line segments contained ineach figure part is divided by the number of black pixels constitutingline segments judged as potentially constituting a table in the figurepart, and whether the line segments constitute a table is judged basedon the value derived by the division. It is to be noted, however, thatthe technique for determining a table region from a plurality of linesegments is not limited to that described in Publication No. 8-249419,and other techniques may be utilized.

(Operation of First Exemplary Embodiment)

In the following, explanation will be made of an operation of the firstexemplary embodiment of the present invention. When a sheet of paperhaving thereon an image is placed by a user on a scanner connected toimage-acquiring section 108 and the scanner is operated to read theimage, image data representing the image is generated by the scanner.Subsequently, when the user operates the operating section 106 toinstruct acquisition of the image data generated by the scanner,image-acquiring section 108 communicates with the scanner to acquire theimage data and stores the acquired data in storage unit 105.

Further, when the user instructs execution of an image-processingprogram through operation of operating section 106, the image-processingprogram is executed by CPU 102. Then, when the user specifies image datastored in storage unit 105 and instructs to conduct image processing onthe specified image data through operation of operating section 106, CPU102 executes the process shown in FIG. 3 according to theimage-processing program.

Specifically, CPU 102 first performs a process (step SA1) for binarizingthe image data specified by the user. FIG. 4 shows an example of animage obtained by the binarizing process. In FIG. 4, image object G 10represents an image of a graph, and image object Gil represents an imageof a table constituted by a plurality of line segments. Further, imageobject G12 represents an image of a string of characters. It should benoted that CPU 102 that binarizes the image data functions as binarizingsection 200.

Following the binarizing process, CPU 102 analyzes the binary image andidentifies figure part(s) in the binary image (step SA2). For example,in the binary image of FIG. 4, image object G10 and image object G11 areidentified as figure parts while image object G12 representing acharacter string is not identified as a figure part. After identifyingfigure parts in the binary image, CPU 102 generates figure identifiersfor identifying each figure part uniquely. For example, a figureidentifier “1” is generated for image object G10 and a figure identifier“2” is generated for image object Gil. It should be noted here that CPU102 that identifies figure parts in the binary image serves as figurepart identifying section 201

Next, CPU 102 scans the binary image to identify line segment(s)included in each identified figure part, and determines coordinates ofboth ends of each line segment (step SA3). For example, in the binaryimage of FIG. 4, line segments L110-L112 extending in a verticaldirection in FIG. 4 and line segments L115-L117 extending in ahorizontal direction in FIG. 4 are identified in image object G10.Further, in image object G11, line segments L120-L122 extending in avertical direction in FIG. 4 and line segments L125-L127 extending in ahorizontal direction are identified. The coordinates of these linesegments may be obtained, for example, by setting the lower left pointof the image as the origin, with x-axis extending horizontally to passthe origin and y-axis extending vertically to pass the origin. It shouldbe noted here that CPU 102, which identifies line segments in the figureparts, serves as line segment identifying section 202.

After identifying line segments in each figure part, CPU 102 labels eachline segment with a number (hereinafter referred to as a “label”) thatuniquely indicates each line segment. Then, the figure identifiersallocated to the respective figure parts, the labels allocated to therespective line segments included in the figure parts identified by thefigure identifiers, and the coordinates of both ends of each linesegment are associated with each other and stored in line segment tableTB10 provided in RAM (Random Access Memory) 104 (step SA4). FIG. 5 showsan example of content of line segment table TB10. As shown, line segmenttable TB10 stores the figure identifiers, labels, and coordinates ofboth ends of each line segment. Further, line segment table TB10 storesfor each line segment a list of labels of other line segments thatintersect the line segment.

For instance, for line segment L110 identified in image object G10 whichis allocated a figure identifier “1,” coordinates (x1, y1) (x1, y2) arespecified and label “Li110” is generated, and then label “Li110” andcoordinates (x1, y1) (x1, y2) are stored in association with figureidentifier “1,” as shown in FIG. 5.

Also, for line segment L120 identified in image object G11 which isallocated a figure identifier “2,” coordinates (x11, y11) (x11, y12) arespecified and label “Li120” is generated, and then label “Li120” andcoordinates (x11, y11) (x11, y12) are stored in association with figureidentifier “2,” as shown in FIG. 5.

In the illustrated example shown in FIG. 5, with regard to the image ofFIG. 4, label “Li111” is generated for line segment L111, label “Li112”for line segment L112, label “Li115” for line segment L115, label“Li116” for line segment L116, and label “Li117” for line segment L117.Further, in the illustrated example shown in FIG. 5, with regard to theimage of FIG. 4, label “Li121” is generated for line segment L121, label“Li122” for line segment L122, label “Li125” for line segment L125,label “Li126” for line segment L126, and label “Li127” for line segmentL127.

After completion of the process of step SA4, CPU 102 refers to the linesegments allocated respective labels to determine an intersectingrelationship between line segments (step SA5). Then, for each linesegment, CPU 102 stores in line segment table TB10 the labels of otherline segments that intersect the line segment. Thus, CPU 102 here servesas intersection-determining section 203 that determines an intersectingrelationship between line segments.

For example, in the image of FIG. 4, line segments L115, L116, and L117intersect line segment L110, and thus labels Li115, Li116, and Li117 ofline segments L115-L117 are stored so as to be associated with labelLi110 of line segment L110, as shown in FIG. 5. Also, because linesegments L125, L126, and L127 intersect line segment L120, labels Li125,Li126, and Li127 of line segments L125-L127 are stored in associationwith label Li120 of line segment L120, as shown in FIG. 5.

It is to be understood from the foregoing explanation that in thisspecification, two line segments that are not parallel with each otherare considered as intersecting each other not only when one line segmentpasses through the other line segment, but also when an end of one linesegment resides on the other line segment.

After determining the intersecting line segments for each line segment,CPU 102 judges a shape of end portions of each line segment and extractsline segments that have a specific end shape(s) (step SA6). For example,in the image of FIG. 4, one end portion of line segment L110 has anarrow shape. CPU 102 extracts line segments with an end portion having apredetermined specific shape (such as line segment L110 with anarrow-shaped end portion) as specific line segments that do notconstitute a table. Thus, line segment L117, which also has an endportion in an arrow shape, is extracted as a line segment notconstituting a table. Thus, CPU 102 here serves as specific line segmentextracting section 204. It should be noted that the line segmentsconstituting image object G11 each have a rectangular outer shape orprofile, and thus are determined as line segments that may constitute atable.

It should be also noted that the line segments extracted as specificline segments that do not constitute a table may not be limited to thosewith an end portion having an arrow shape, and specific line segments tobe extracted may include line segments with an end portion havinganother specific shape, such as a line segment with an end portionhaving a width different from the width of another portion of the linesegment (e.g., a middle portion of the line segment), a line segmenthaving a fork-shaped end portion, a line segment having a round orelliptic end portion, or a line segment with a polygonal end portionhaving a larger width than another portion of the line segment, forexample.

Subsequently, CPU 102 deletes the rows of line segment table TB10 inwhich the labels of the line segments extracted as specific linesegments in step SA6 are contained (step SA7). As a result, line segmenttable TB10 of FIG. 5 is converted into the table shown in FIG. 6, inwhich, among the rows related with figure identifier “1,” the rowscontaining labels Li110 and Li117 have been deleted. It is to be notedthat if there is a line segment that has no intersecting line segments,a row containing the label of such a line segment may be deleted fromline segment table TB10.

After line segment table TB10 of FIG. 6 is obtained, CPU 102 judgeswhether the remaining line segments specified by the coordinatescontained in this line segment table TB10 constitute a table (step SA8).Thus, CPU 102 here serves as table region determining section 205. Forexample, in connection with the part allocated figure identifier “1,”CPU 102 judges whether line segments L111, L112, L115, and L116constitute a table.

Regarding the part allocated figure identifier “1,” the total number ofblack pixels contained in this part is calculated as the sum of thenumber of black pixels representing line segments L110-L112 and linesegments L115-L117. On the other hand, the number of black pixels of theline segments included in this part and judged as potentiallyconstituting a table is calculated as the sum of the number of blackpixels representing line segments L111, L112, L115, and L116. If a valueobtained by dividing the sum of the number of black pixels representingline segments L111, L112, L115, and L116 with the sum of the number ofblack pixels representing line segments L110-L112 and line segmentsL115-L117 is smaller than a predetermined threshold value (for example,0.9), CPU 102 determines that the part allocated figure identifier “1”is not a table region. It should be noted that the above threshold valueof 0.9 is an example, and the threshold value may be other value.

On the other hand, in connection with the part allocated figureidentifier “2,” CPU 102 judges whether line segments L120-L122 andL125-L127 constitute a table. In the part allocated figure identifier“2,” the total number of black pixels contained in this part iscalculated as the sum of the number of black pixels representing linesegments L120-L122 and line segments L125-L127. Further, the number ofblack pixels of the line segments included in this part and judged aspotentially constituting a table is also calculated as the sum of thenumber of black pixels representing line segments L120-L122 and linesegments L125-L127.

Thus, in this case, the value obtained by dividing the number of blackpixels representing the line segments contained in this part and judgedas potentially constituting a table with the total number of blackpixels contained in this part is one (1), and hence is equal to orgreater than the predetermined threshold value (e.g., 0.9), andtherefore, CPU 102 determines that the part allocated figure identifier“2” is a table region.

After determining a table region in the binary image, CPU 2 controlsdisplay section 107 to display an image such as that shown in FIG. 7,where the part judged to be a table region, i.e., image object G11, iscolored black, for example, to thereby notify the user of the partjudged to be a table region. It is to be noted, however, that the way ofindicating the part judged to be a table region to the user is not thuslimited, and any other way may be used, such as displaying an image inwhich the table region is surrounded by a rectangle, for example.

[Second Exemplary Embodiment]

(Structure of Second Exemplary Embodiment)

Next, explanation will be made of computer device 1 according to asecond exemplary embodiment of the present invention. The hardwarestructure of computer device 1 in the second exemplary embodiment is thesame as that of the first exemplary embodiment, but the image-processingprogram executed by CPU 102 (and hence the process carried out by CPU102 that executes the image processing program) is different from thatof the first exemplary embodiment. Thus, in the following, explanationof the hardware structure, which is the same as that described in thefirst exemplary embodiment, will be omitted, and the points that differfrom the first exemplary embodiment will be explained.

FIG. 8 shows functional blocks implemented by execution of animage-processing program in the second exemplary embodiment by CPU 102.In this exemplary embodiment, the image-processing program is executedto implement incremental line determining section 206 instead ofspecific line segment extracting section 204. Incremental linedetermining section 206 is a section for determining incremental linesin a graph.

(Operation of Second Exemplary Embodiment)

In this exemplary embodiment also, first, image-acquiring section 108acquires image data from the scanner, and CPU 102 that executes theimage-processing program generates a binary image from the acquiredimage data (FIG. 9: step SA1). FIG. 10 shows an example of an imageobtained by the binarizing process. In FIG. 10, image object G20 is animage of a graph having line segments L141-L148 that serve asincremental lines in the graph.

After the binarizing process is completed, CPU 102 analyzes the binaryimage to identify figure part(s) in the binary image (step SA2). Then,CPU 102 scans the binary image to identify line segments in the figureparts and determine the coordinates of each identified line segment(step SA3). For example, in the binary image of FIG. 10, line segmentsL130-L132 extending in a vertical direction in the drawing, linesegments L135-L137 extending in a horizontal direction in the drawing,and line segments L141-L148 representing incremental lines of the graphare identified in image object G20. The coordinates of these linesegments may be obtained, for example, by setting the lower left pointof the image as the origin, with x-axis extending horizontally to passthe origin and y-axis extending vertically to pass the origin.

After identifying line segments in each figure part, CPU 102 provideseach line segment with a label that uniquely indicates each linesegment. Then, the figure identifiers allocated to respective figureparts, the labels allocated to respective line segments included in thefigure parts identified by the figure identifiers, and the coordinatesof both ends of each line segment are associated with each other andstored in line segment table TB10 provided in RAM 104 (step SA4).

It is to be noted that in this example of operation, with regard to theimage of FIG. 10, labels “Li130”-“Li132” are generated for line segmentsL130-L132, respectively. Also, labels “Li135”-“Li137” are generated forline segments L135-L137, respectively, and labels “Li141”-“Li148” aregenerated for line segments L141-L148, respectively.

After completion of the process of step SA4, CPU 102 refers to the linesegments allocated respective labels to determine an intersectingrelationship between line segments (step SA5). Then, for each linesegment, CPU 102 stores in line segment table TB10 the labels of otherline segments that intersect the line segment. As a result of the aboveprocesses, line segment table TB10 shown in FIG. 11 is obtained.

After determining the intersecting line segments for each line segment,CPU 102 identifies incremental lines and graduated lines (step SA6A).

As a concrete example, CPU 102 identifies an incremental line as a linesegment that intersects only a single line segment, and identifies agraduated line as a line segment that intersects with incremental lines.

For example, as shown in line segment table TB10 of FIG. 11, linesegments L141-L144, which are allocated labels Li141-Li144,respectively, each intersect only a single line segment (i.e., linesegment L130 with label L130), and thus are identified as incrementallines. Further, line segment L130 is identified as a graduated linebecause it intersects with incremental lines L141-L144. Similarly, linesegments L145-L148, which are allocated labels Li145-Li148,respectively, each intersect only a single line segment L137 (labelLi137), and thus are identified as incremental lines. Accordingly, linesegment L137, which intersects with these incremental lines L145-L148,is identified as a graduated line.

Subsequently, CPU 102 deletes the rows of line segment table TB10 inwhich the labels of the line segments extracted as incremental lines oras graduated lines in step SA6A are contained (step SA7A).

In the case of the image of FIG. 10, the rows in which labels“Li141”-“Li148” that correspond to line segments L141-L148,respectively, are contained are deleted from line segment table TB10.

Further, the rows in which labels “Li130” and “Li137” that correspond toline segments L130 and L137, respectively, are contained are alsodeleted from line segment table TB10. As a result, line segment tableTB10 as shown in FIG. 12 is obtained. It is to be noted that in thisexemplary embodiment also, a row containing the label of a line segmentthat has no intersecting line segments may be deleted from line segmenttable TB10.

After completion of the process of step SA7A, CPU 102 judges whether theremaining line segments specified by the coordinates contained in linesegment table TB10 constitute a table (step SA8).

Regarding the part corresponding to image object G20, the total numberof black pixels contained therein is equal to the sum of the number ofblack pixels representing line segments L130-L132, line segmentsL135-L137, and line segments L141-L148.

On the other hand, the number of black pixels of the line segmentsincluded in this part and judged as potentially constituting a table isequal to the sum of the number of black pixels representing linesegments L131, L132, L135, and L136.

If a value obtained by dividing the sum of the number of black pixelsrepresenting line segments L131, L132, L135, and L136 with the sum ofthe number of black pixels representing line segments L110-L132, is linesegments L135-L137, and line segments L141-L148 is smaller than apredetermined threshold value (for example, 0.9), CPU 102 determinesthat image object G20 shown in FIG. 10 is not a table region.

[Modifications]

In the foregoing, explanation is made of exemplary embodiments of thepresent invention, but the present invention is not limited to theabove-described exemplary embodiments and may be carried out in variousother embodiments. For example, the above embodiments may be modified asfollows in practicing the present invention. It is to be noted that theabove-described embodiments and the following modifications may be usedin any combination, as necessary.

It is possible to combine the first and second exemplary embodimentsdescribed above so that CPU 102 for executing the image-processingprogram carries out both of the processes shown in FIG. 3 and FIG. 9.

For example, in the above-described second exemplary embodiment, when aline segment having an arrow-shaped end portion is identified in afigure part, this figure part may be determined as not being a tableregion.

Also, in the above-described first exemplary embodiment, when agraduated line (i.e., a line that intersects incremental lines) isidentified in a figure part, this figure part may be determined as notbeing a table region.

Further, in the above-described exemplary embodiments, it is possible tojudge whether a rectangle(s) is formed by some of the line segmentsstored in line segment table TB10, and delete the rows regarding linesegments that do not contribute to the formation of rectangle(s) fromline segment table TB10. For example, in an image shown in FIG. 13, linesegments L160-L163 constitute a rectangle and line segments L164-L167constitute another rectangle, and thus the labels and coordinates ofthese line segments are stored in line segment table TB10. On the otherhand, line segments L150-L153 do not contribute to the formation ofrectangles, and thus the labels and coordinates of these line segmentsare deleted from line segment table TB10. Consequently, for the imageshown in FIG. 13, CPU 102 judges whether line segments L160-L167constitute a table.

In the above-described exemplary embodiments, CPU 102 executes animage-processing program to process image data and identify a tableregion in the image data, but the configuration for applying theabove-described image processing to an image represented by image datais not limited to such an embodiment. For example, a hardware devicesuch as a DSP (Digital Signal Processor) or a programmable logic devicefor executing the processes of first and/or second exemplary embodimentsmay be connected to bus 101, and image data may be provided to thehardware so that the processes of first and/or second exemplaryembodiments can be carried out by the hardware.

The above-described image processing program may be provided in a statestored in a computer-readable storage medium such as a magnetic storagemedium (magnetic tape, magnetic disk (HDD (Hard Disk Drive), FD(Flexible Disk)), etc.), optical storage medium (optical disk (CD(Compact Disk), DVD (Digital Versatile Disk)), etc.), opto-magneticstorage medium, semiconductor memory, etc., and installed in computerdevice 1. It is also possible to download the image-processing programvia communications network and install the downloaded program.

In the above-described exemplary embodiments, the image-processingprogram is executed by a PC, but a computer device other than a PC mayexecute the image-processing program. For example, the image-processingprogram may be executed by an image-forming device having a copyfunction and/or scanner function, so that the image-forming devicecarries out the processes explained above with respect to the firstand/or second exemplary embodiments.

The foregoing description of the embodiments of the present invention isprovided for the purposes of illustration and description. It is notintended to be exhaustive or to limit the invention to the precise formsdisclosed. Obviously, many modifications and variations will be apparentto practitioners skilled in the art. The embodiments were chosen anddescribed in order to best explain the principles of the invention andits practical applications, thereby enabling others skilled in the artto understand the invention for various embodiments and with the variousmodifications as are suited to the particular use contemplated. It isintended that the scope of the invention be defined by the followingclaims and their equivalents.

What is claimed is:
 1. An image-processing device comprising: anacquisition section that acquires a binary image represented by firstpixels each having a first pixel value and second pixels each having asecond pixel value; a figure part identifying section that identifies afigure part in the binary image; a line segment identifying section thatidentifies line segments included in the figure part identified by thefigure part identifying section; a specific line segment extractingsection that determines whether each line segment identified by the linesegment identifying section has an end portion having a specific shape,and extracts a line segment with an end portion having the specificshape as a specific line segment; and a table region determining sectionthat determines whether the figure part identified by the figure partidentifying section is a table region based on the line segmentsidentified by the line segment identifying section excluding thespecific line segment extracted by the specific line segment extractingsection.
 2. The image-processing device according to claim 1, furthercomprising an intersection determining section for determining anintersecting relationship between the line segments identified by theline segment identifying section, wherein the table region determiningsection determines whether the figure part identified by the figure partidentifying section is a table region based on the line segmentsidentified as intersecting other line segment(s) by the intersectiondetermining section among the line segments identified by the linesegment identifying section excluding the specific line segment.
 3. Animage-processing device comprising: an acquisition section that acquiresa binary image represented by first pixels each having a first pixelvalue and second pixels each having a second pixel value; a figure partidentifying section that identifies a figure part in the binary image; aline segment identifying section that identifies line segments includedin the figure part identified by the figure part identifying section; anintersection determining section that determines an intersectingrelationship between the line segments identified by the line segmentidentifying section; an incremental line identifying section thatidentifies an incremental line from among the line segments identifiedby the line segment identifying section; a graduated line identifyingsection that identifies a line segment that intersects the incrementalline as a graduated line from among the line segments identified by theline segment identifying section; and a table region determining sectionthat determines whether the figure part identified by the figure partidentifying section is a table region based on the line segmentsidentified by the line segment identifying section excluding theincremental line and the graduated line.
 4. The image-processing deviceaccording to claim 3, wherein the line segments based on which the tableregion determining section determines whether the figure part identifiedby the figure part identifying section is a table region furtherexcludes a line segment that does not intersect other line segments. 5.A method for determining whether a table region is included in an image,comprising: acquiring a binary image represented by first pixels eachhaving a first pixel value and second pixels each having a second pixelvalue; identifying a figure part in the binary image; identifying linesegments included in the figure part; determining whether each linesegment identified by the line segment identifying step has an endportion having a specific shape, and extracting a line segment with anend portion having the specific shape as a specific line segment; anddetermining whether the figure part identified by the figure partidentifying step is a table region based on the line segments identifiedby the line segment identifying step excluding the specific linesegment.
 6. A method for determining whether a table region is includedin an image, comprising: acquiring a binary image represented by firstpixels each having a first pixel value and second pixels each having asecond pixel value; identifying a figure part in the binary image;identifying line segments included in the figure part; determining anintersecting relationship between the line segments identified by theline segment identifying step; identifying an incremental line fromamong the line segments identified by the line segment identifying step;identifying a line segment that intersects the incremental line as agraduated line from among the line segments identified by the linesegment identifying step; and determining whether the figure partidentified by the figure part identifying step is a table region basedon the line segments identified by the line segment identifying stepexcluding the incremental line and the graduated line.
 7. Anon-transitory computer readable storage medium storing a programcausing a computer to execute a process for determining whether a tableregion is included in an image, the process comprising: acquiring abinary image represented by first pixels each having a first pixel valueand second pixels each having a second pixel value; identifying a figurepart in the binary image; identifying line segments included in thefigure part; determining whether each line segment identified by theline segment identifying step has an end portion having a specificshape, and extracting a line segment with an end portion having thespecific shape as a specific line segment; and determining whether thefigure part identified by the figure part identifying step is a tableregion based on the line segments identified by the line segmentidentifying step excluding the specific line segment.
 8. Anon-transitory computer readable storage medium storing a programcausing a computer to execute a process for determining whether a tableregion is included in an image, the process comprising: acquiring abinary image represented by first pixels each having a first pixel valueand second pixels each having a second pixel value; identifying a figurepart in the binary image; identifying line segments included in thefigure part; determining an intersecting relationship among the linesegments identified by the line segment identifying step; identifying anincremental line from among the line segments identified by the linesegment identifying step; identifying a line segment that intersects theincremental line as a graduated line from among the line segmentsidentified by the line segment identifying step; and determining whetherthe figure part identified by the figure part identifying step is atable region based on the line segments identified by the line segmentidentifying step excluding the incremental line and the graduated line.